<%@page import="java.util.TreeMap"%>
<%@page import="java.util.Map"%>
<%@page import="entities.MetaSeo"%>
<%@page import="systems.AdsSystem"%>
<%@page import="helpers.UrlHelper"%>
<%@page import="helpers.StringHelper"%>
<%@page import="java.util.List"%>
<%@page import="entities.GoogleAnalytic"%>
<%
GoogleAnalytic googleAnalytic = (GoogleAnalytic) request.getAttribute("googleAnalytic");
MetaSeo metaseo = (MetaSeo) request.getAttribute("metaseo");

//Set content for Seo
Map<String, String> replates = new TreeMap<String, String>();
replates.put("__SERVER_NAME__", UrlHelper.getDomainServer(request));
replates.put("__SERVER_URL__", UrlHelper.getServerUrl(request));
replates.put("__ANALYTIC_ACCOUNT__", googleAnalytic.getAnanyticAccount());
replates.put("__ANALYTIC_LIST_DOMAIN__", StringHelper.listToString(googleAnalytic.getDomains(), ", ", 6));

String title = StringHelper.replateContent(metaseo.getTitle(), replates);
String description = StringHelper.replateContent(metaseo.getDescription(), replates);
String keywords = StringHelper.replateContent(metaseo.getKeywords(), replates);
String url = StringHelper.replateContent(metaseo.getOgurl(), replates);
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/templates/showsite/layouts/header.jsp">
	<jsp:param name="title" value="<%=title %>" />
    <jsp:param name="description" value="<%=description %>" />
    <jsp:param name="keywords" value="<%=keywords %>" />
    <jsp:param name="ogtitle" value="<%=title %>" />
    <jsp:param name="ogurl" value="<%=url %>" />
    <jsp:param name="ogdescription" value="<%=description%>" />
</jsp:include>

		<div class="row-fluid">
		
			<div class="span8">
				<div class="row-fluid">
					<section>
						<div class="f-info">
							<h3>Analytic Account Id: <%=googleAnalytic.getAnanyticAccount() %></h3>
							<div class="content-block">
								<ul class="col4 clearfix">
									<%
									List<String> domains = googleAnalytic.getDomains();
									for (int i = 0; i < domains.size(); i++) {
									%>
									<li><a href="/www/<%=domains.get(i)%>"><%=domains.get(i)%></a></li>
										<% if (i == 7) { %>
										</ul>
											<div class="adv">
												<%=AdsSystem.getAds468x60() %>
											</div>
										<ul class="col4 clearfix">
										<% } %>
									<% } %>
								</ul>
								
							</div>
						</div>
					</section>
					
				</div>
			</div>
			<jsp:include page="/templates/showsite/elements/right.jsp" />
		</div>
	
<jsp:include page="/templates/showsite/layouts/footer.jsp" />